package com.example.demo.Server.impl;

import com.example.demo.DTO.HR_Login_DTO;
import com.example.demo.Server.HRServer;
import com.example.demo.entity.HR;
import com.example.demo.entity.JobPosition;
import com.example.demo.mapper.HR_Mapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Slf4j
@Service
public class HR_Impl implements HRServer {

    @Autowired
    private HR_Mapper hr_Mapper;
    @Override
    public HR login(HR_Login_DTO hrLoginDto) {
        HR login = hr_Mapper.login(hrLoginDto);
        log.info("login:{}",login);
        return  login;
    }

    @Override
    public int Register(HR hr) {
        return hr_Mapper.Register(hr);
    }

    @Override
    public int updata(HR hr) {
        return hr_Mapper.updata(hr);
    }

    @Override
    public ArrayList<JobPosition> select(Integer id) {
        return hr_Mapper.select(id);
    }


}
